return {
    "saghen/blink.cmp",
    dependencies = {
        -- 'rafamadriz/friendly-snippets'
        "moyiz/blink-emoji.nvim",
        "rafamadriz/friendly-snippets",
        -- "nvim-mini/mini.snippets",
        -- {
        -- config = function()
        -- local gen_loader = require("mini.snippets").gen_loader
        -- require("mini.snippets").setup({
        -- snippets = {
        -- -- Load custom file with global snippets first (adjust for Windows)
        -- gen_loader.from_file("~/.config/nvim/vscode-snippets"),

        -- -- Load snippets based on current language by reading files from
        -- -- "snippets/" subdirectories from 'runtimepath' directories.
        -- gen_loader.from_lang(),
        -- },
        -- })
        -- end,
        -- },
    },
    version = "1.*",

    opts = {
        keymap = {
            preset = "none",
            ["<M-k>"] = { "select_prev", "fallback" },
            ["<M-j>"] = { "select_next", "fallback" },
            ["<CR>"] = { "accept", "fallback" },
            ["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
            -- ["<cr>"] = { "accept" },
            ["<Tab>"] = { "snippet_forward", "fallback" },
            ["<S-Tab>"] = { "snippet_backward", "fallback" },
        },

        appearance = {
            nerd_font_variant = "mono",
        },

        completion = {
            menu = {
                border = "rounded",
                direction_priority = { "n", "s" },
                draw = { treesitter = { "lsp" } },
            },
            documentation = {
                auto_show = true,
                window = { border = "rounded" },
            },
            trigger = {
                show_on_keyword = true,
                show_on_accept_on_trigger_character = true,
                show_on_insert_on_trigger_character = true,
                show_on_trigger_character = true,
                show_on_blocked_trigger_characters = { " ", "\n", "\t" },
            },
            ghost_text = { enabled = false },
            list = { selection = { preselect = false } },
        },

        sources = {
            default = { "lsp", "path", "snippets", "buffer", "emoji" },
            providers = {
                path = {
                    name = "Path",
                    module = "blink.cmp.sources.path",
                    score_offset = 70,
                    min_keyword_length = 2,
                    fallbacks = { "snippets", "buffer" },
                    opts = {
                        trailing_slash = false,
                        label_trailing_slash = true,
                        get_cwd = function(context)
                            return vim.fn.expand(("#%d:p:h"):format(context.bufnr))
                        end,
                        show_hidden_files_by_default = true,
                    },
                },

                lsp = {
                    name = "lsp",
                    enabled = true,
                    kind = "LSP",
                    module = "blink.cmp.sources.lsp",
                    score_offset = 95,
                },

                -- snippets = {
                -- name = "snippets",
                -- module = "blink.cmp.sources.snippets",
                -- score_offset = 80,
                -- search_paths = { "~/.local/share/nvim/site/pack/luarocks/opt/friendly-snippets/snippets/" },
                -- opts = {
                -- show_snippet_name = true,
                -- max_item_count = 5,
                -- },
                -- },

                emoji = {
                    module = "blink-emoji",
                    name = "Emoji",
                    score_offset = 15, -- Tune by preference
                    opts = {
                        insert = true, -- Insert emoji (default) or complete its name
                        ---@type string|table|fun():table
                        trigger = function()
                            return { ":" }
                        end,
                    },
                    should_show_items = function()
                        return vim.tbl_contains(
                            -- Enable emoji completion only for git commits and markdown.
                            -- By default, enabled for all file-types.
                            { "gitcommit", "markdown" },
                            vim.o.filetype
                        )
                    end,
                },
            },
        },
        fuzzy = {
            implementation = "prefer_rust",
            sorts = {
                "exact",
                "score",
                "sort_text",
            },
        },
        signature = {
            enabled = true,
            trigger = { show_on_insert = true },
            window = {
                border = "rounded",
                direction_priority = { "s", "n" },
                show_documentation = true,
            },
        },
    },
    opts_extend = { "sources.default" },
}
